import api from '../../utils/request.js'
import request from "../../utils/request.js";

export default {
    findPostAPI(pageNum,orderBy,order){
        return request({
            url: '/post/list',
            method: 'get',
            params: {
                pageNum:pageNum,
                pageSize:5,
                orderBy:orderBy,
                order:order
            }
        })
    },
    postSearch(key){
        return request({
            url: '/post/findById',
            method: 'get',
            params: {
                id:key
            }
        })
    },
    postreSearch(key){
        return request({
            url: '/post/findRlyByPostId',
            method: 'get',
            params: {
                id:key
            }
        })
    },
    postuserSearch(key) {
        return request({
            url: `/user/findById`,
            method: 'get',
            params: {
                id: key
            }
        })
    },
    deletePost(id){
        return request({
            url:'/post/delete',
            method:'GET',
            params:{
                id:id
            }
        })
    }
}
